This patent document relates to assembling nucleic acid fragments, particularly fragments that are difficult to be assembled using conventional technology. In general, it is challenging to synthesize large nucleic acids in one step due to the error rate of incorporating each additional nucleotide. Therefore, large size nucleic acids are assembled from smaller fragments that can be sequence verified. It is difficult to assemble certain sequences, such as sequences containing small fragments that do not have overlapping sequences or sequences containing many repeats. The technology disclosed herein solves these problems by providing a method to assemble nucleic acids in an orientation-specific, sequence-independent way on a solid phase.